
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type LiveGoodRequest struct {

	GoodsId string `json:"goods_id" form:"goods_id"`

	AuditId string `json:"audit_id" form:"audit_id"`

	ProductId string `json:"product_id" form:"product_id"`

	Name string `json:"name" form:"name"`

	CoverImg string `json:"cover_img" form:"cover_img"`

	Url string `json:"url" form:"url"`

	PriceType string `json:"price_type" form:"price_type"`

	CostPrice string `json:"cost_price" form:"cost_price"`

	Price string `json:"price" form:"price"`

	Price2 string `json:"price2" form:"price2"`

	AuditStatus string `json:"audit_status" form:"audit_status"`

	ThirdPartTag string `json:"third_part_tag" form:"third_part_tag"`

	Sort string `json:"sort" form:"sort"`

	IsShow string `json:"is_show" form:"is_show"`

	IsDel string `json:"is_del" form:"is_del"`

	AddTime string `json:"add_time" form:"add_time"`

}

func (r *LiveGoodRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *LiveGoodRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"goods_id": "required",

		"audit_id": "required",

		"product_id": "required",

		"name": "required",

		"cover_img": "required",

		"url": "required",

		"price_type": "required",

		"cost_price": "required",

		"price": "required",

		"price2": "required",

		"audit_status": "required",

		"third_part_tag": "required",

		"sort": "required",

		"is_show": "required",

		"is_del": "required",

		"add_time": "required",

	}
}

func (r *LiveGoodRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *LiveGoodRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *LiveGoodRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
